import Vue from "vue";
import VueRouter from "vue-router";
import Home from "@/pages/Home";
import Login from "@/pages/Login";
//把VueRouter作为插件使用
Vue.use(VueRouter);

//实例化VueRouter得到router对象
const router = new VueRouter({
  //配置路由表
  routes: [
    {
      path: "/login",
      component: Login,
    },
    {
      path: "/home",
      component: Home,
    },
  ],
});
export default router;
